#include <SimpleAmqpClient/SimpleAmqpClient.h>
#include <string>

int main()
{
    using std::string;

    string host = "127.0.0.1";    
    int port = 5672;    
    string username = "guest";
    string password = "guest";
    string vhost = "/";

    // 创建Channel
    AmqpClient::Channel::ptr_t channel = AmqpClient::Channel::Create(host, port, username, password, vhost);
    // 构建消息
    AmqpClient::BasicMessage::ptr_t message = AmqpClient::BasicMessage::Create("Hello RabbitMQ1");
    // 发布消息
    string exchange = "my.direct";
    string routingKey = "key1";
    channel->BasicPublish(exchange, routingKey, message);
}


